/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.openjawtech.xscraper.web.util;

/**
 *
 * @Created on 13-Mar-2009, 14:12:12
 * @author Wenbo.Sun
 */
public class FormatUtil {

    public static String firstToUpper(String source){
        String[] str = source.toLowerCase().trim().split(" ");
        String dest = "";
        for(String subStr:str){
            char[] chars = subStr.toCharArray();
            chars[0] = Character.toUpperCase(chars[0]);
            subStr = new String(chars);

            dest += subStr + " ";
        }
        return dest.trim();
    }
}
